from db_manager import DatabaseManager

def main():
    # 创建数据库管理器实例
    db = DatabaseManager()
    
    # 获取所有表
    print("\n=== 数据库中的表 ===")
    tables = db.get_tables()
    for table in tables:
        print(f"- {table['table_name']}")
    
    # 获取system_tenant表的信息
    print("\n=== system_tenant表结构 ===")
    columns = db.get_table_columns('system_tenant')
    for column in columns:
        print(f"- {column['column_name']}: {column['data_type']} (可空: {column['is_nullable']})")
    
    # 获取system_tenant表的数据
    print("\n=== system_tenant表数据 ===")
    data = db.get_table_data('system_tenant')
    for row in data:
        print("\n租户信息:")
        for key, value in row.items():
            print(f"  {key}: {value}")

if __name__ == "__main__":
    main() 